package com.hung.tripleregistry.core.model;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.util.Map;
import java.util.TreeSet;

/**
 * @author Hung
 * @date 2022/10/4 1:34
 */
@Data
@ToString
@NoArgsConstructor
public class RpcAdminRegistryResponse implements Serializable {
    public static final long serialVersionUID = 42L;

    public static final int SUCCESS_CODE = 200;
    public static final int FAIL_CODE = 500;

    private int code;
    private String msg;
    private Map<String, TreeSet<String>> registryData;


    public RpcAdminRegistryResponse(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public RpcAdminRegistryResponse(Map<String, TreeSet<String>> registryData) {
        this.code = SUCCESS_CODE;
        this.registryData = registryData;
    }


}
